Skip to content

Conversation

@multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Apr 28, 2025

Summary of changes

I picked up an NUMAKER_PFM_M487 board last week and hooked it up to my greentea setup. It passed almost all the greentea tests! However, I did make some fixes:

  • Added COMPONENT_SPIF since this board has an SPI flash -- now Mbed applications can use the flash easily!
  • Remove PyOCD support as I was not able to get PyOCD to detect this board, and it didn't seem to me like it was supported
  • Add some notes about upload methods for the board

Impact of changes

Migration actions required

Documentation


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR
96% tests passed, 4 tests failed out of 114

Total Test time (real) = 2484.03 sec

The following tests did not run:
         11 - test-mbed-drivers-mem-trace (Skipped)
         27 - test-mbed-hal-crc (Skipped)
         33 - test-mbed-hal-ospi (Skipped)
         35 - test-mbed-hal-qspi (Skipped)
         46 - test-mbed-hal-trng (Skipped)
         51 - test-mbed-hal-verify-arduino-pinmap (Skipped)
         97 - test-mbed-connectivity-mbedtls-sanity (Skipped)
         98 - test-mbed-connectivity-mbedtls-selftest (Skipped)
         99 - test-mbed-connectivity-nfc-eeprom (Skipped)
        102 - test-mbed-connectivity-netsocket-nidd (Skipped)
        105 - test-mbed-connectivity-netsocket-lwipstack-tls (Skipped)
        106 - test-mbed-connectivity-netsocket-nanostack-tls (Skipped)
        112 - test-mbed-connectivity-network-lwipstack-wifi (Skipped)
        113 - test-mbed-connectivity-network-nanostack-wifi (Skipped)
        114 - test-mbed-device_key-functionality (Skipped)

The following tests FAILED:
         13 - test-mbed-drivers-reset-reason (Failed)
         21 - test-mbed-usb-device-basic (Failed)
         36 - test-mbed-hal-reset-reason (Failed)
        109 - test-mbed-connectivity-network-emac (Failed) 

Failure reasons:

  • test-mbed-drivers-reset-reason and test-mbed-hal-reset-reason: Looks like the MCU is not getting reset when the test runner tries to send a break over the serial port. Is this supported for Nu-Link?
  • test-mbed-usb-device-basic:
[+45324ms][CONN][RXD] >>> Running case #13: 'endpoint test data toggle reset'...
[+45334ms][CONN][INF] found KV pair in stream: {{__testcase_start;endpoint test data toggle reset}}, queued...
[+45692ms][CONN][INF] found KV pair in stream: {{ep_test_data_toggle;0123456789}}, queued...
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
interface 0, alt 2 -- running tests
interface 0, alt 3 -- running tests
interface 0, alt 4 -- running tests
interface 0, alt 0 -- skipping the default AlternateSetting
interface 0, alt 1 -- running tests
[+46705ms][HTST][INF] TEST FAILED: [/home/jamie/Mbed/mbed-os/drivers/usb/tests/TESTS/host_tests/pyusb_basic.py]:1474, Data toggle not reset when clearing endpoint halt.
[+46707ms][SERI][TXD] {{fail;0}}
[+46717ms][CONN][RXD] <greentea test suite>:425::FAIL: Expected 'pass' Was 'fail'
[+46728ms][CONN][RXD] >>> 'endpoint test data toggle reset': 0 passed, 1 failed with reason 'Assertion Failed'
[+46728ms][CONN][RXD] 
[+46728ms][CONN][RXD] 
[+46728ms][CONN][INF] found KV pair in stream: {{__testcase_finish;endpoint test data toggle reset;0;1}}, queued...
[+46738ms][CONN][RXD] >>> Test cases: 12 passed, 1 failed with reason 'Assertion Failed'
[+46739ms][CONN][RXD] >>> TESTS FAILED!
[+46739ms][CONN][RXD] 
  • test-mbed-connectivity-network-emac: Looks like multicast filtering is not working

@multiplemonomials multiplemonomials requested a review from ccli8 April 28, 2025 02:02
@multiplemonomials
Copy link
Collaborator Author

@ccli8 One other note: I noticed that the M487 does not define DEVICE_TRNG, so SSL is not supported out of the box and the SSL tests are being skipped. Do you have a chance to add TRNG support for this target?

@ccli8
Copy link

ccli8 commented Apr 28, 2025

One other note: I noticed that the M487 does not define DEVICE_TRNG, so SSL is not supported out of the box and the SSL tests are being skipped. Do you have a chance to add TRNG support for this target?

Nuvoton's M480 series (M487) supports only PRNG, but no TRNG.

@multiplemonomials
Copy link
Collaborator Author

Keep PyOCD is for easy to use M487 NuLink2 board. Of course, it is also fine to remove PyOCD for reflecting M487 board real status.

That board that supports PyOCD doesn't exist currently in Mbed right? Once that board is added it should get PyOCD added in its upload method file, but PFM_M487 doesn't support OpenOCD so we should remove this from its upload method file.

@ccli8
Copy link

ccli8 commented Apr 28, 2025

For NUMAKER_PFM_M487/NUMAKER_IOT_M487 targets, support or not for PyOCD depends on the board's probe is NuLink1 or NuLink2. However, public available boards' probe is NuLink1, so PyOCD cannot work with these boards.

OpenOCD is supported across NuLink1 and NuLink2, except NuLink1 doesn't support USB serial number as above.

@multiplemonomials
Copy link
Collaborator Author

Sounds good. Once the NuLink2 boards become available would you be able to make a separate Mbed target for those?

@ccli8
Copy link

ccli8 commented Apr 28, 2025

Sad, M487 NuLink2 boards are for special purposes or internal uses, so there is no Mbed target for it.

@multiplemonomials
Copy link
Collaborator Author

btw, if you have boards that are not publicly available, you might find it easiest to create them as custom targets.

@multiplemonomials multiplemonomials merged commit 37ace18 into master Apr 28, 2025
52 checks passed
@multiplemonomials multiplemonomials deleted the dev/nuvoton-m487-fixes branch April 28, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants